package net.sevear.chaos.view.p2p
{
	import flash.events.Event;
	
	import net.sevear.chaos.vo.ChaosP2PSiteInfo;
	
	import spark.components.Group;
	import spark.components.Image;
	
	public class P2pSiteViewItem extends Group
	{
		private var _siteInfo:ChaosP2PSiteInfo;
		private var _selected:Boolean;
		private var _icon:Image;
		public function P2pSiteViewItem()
		{
			super();
		}
		
		public function set siteInfo(value:ChaosP2PSiteInfo):void{
			_siteInfo = value;
			selected = false;
			updateView();
		}
		
		public function get siteID():int{
			if(_siteInfo!=null){
				return _siteInfo.siteID;
			}else 
				return -1;
		}
		
		public function set selected(value:Boolean):void{
			if(value!=_selected){
				_selected = value;
				dispatchEvent(new Event(Event.CHANGE));
			}
		}
		
		public function get selected():Boolean{
			return _selected;
		}
		
		private function updateView():void{
			//icon image
		}
	}
}